//
//  WJMessageViewController.m
//  weibo
//
//  Created by 王俊 on 15/12/20.
//  Copyright © 2015年 王俊. All rights reserved.
//

#import "WJMessageViewController.h"
#import "WJDetailViewController.h"

@interface WJMessageViewController ()

@end

@implementation WJMessageViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    [self setUpViews];


    
}

- (void)setUpViews
{

    self.table.dataSource = self;
    self.table.delegate = self;
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:@"发消息" style:UIBarButtonItemStylePlain target:self action:@selector(sendMessage)];

}

- (void)chatBtnClicked
{
    NSLog(@"%s",__func__);
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 8;
}


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    UITableViewCell *cell = [[UITableViewCell alloc]init];
    cell.textLabel.text = [NSString stringWithFormat:@"%ld",(long)indexPath.row];
    return cell ;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    WJDetailViewController *vc = [[WJDetailViewController alloc]init];
    vc.hidesBottomBarWhenPushed = true;
    [self.navigationController pushViewController:vc animated:true];
}

- (void)sendMessage
{
    NSLog(@"send Message!");
}
@end
